package cn.dlc.com.order.feign;

import feign.Response;
import feign.codec.ErrorDecoder;

// 发生错误的时候统一返回的配置，返回的应该是一个异常
public class MyErrorDecoder implements ErrorDecoder {

    @Override
    public Exception decode(String methodKey, Response response) {
        System.out.println(methodKey);
        System.out.println("my errorDecoder");
        return decode(methodKey, response);
    }
}
